from flask import Flask

# 创建 Flask 应用
def create_app(config_class='config.Config'):
    app = Flask(__name__)
    app.config.from_object(config_class)

    # 注册蓝图、路由等
    from .routes import main_bp
    app.register_blueprint(main_bp)
    
    from .hik import hik_bp
    app.register_blueprint(hik_bp)

    return app
